package com.jason.bbs.bean.article;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Index;
import javax.persistence.Table;

import lombok.Data;

@Data
@Entity
@Table(name = "Article", indexes = {
		@Index(columnList="block_id"),
		@Index(columnList="user_id"),
})
public class Article {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	@Column(name = "block_id", nullable = false)
	private Integer blockId;
	@Column(name = "user_id", nullable = false)
	private Integer userId;
	@Column(length = 50, nullable = false)
	private String title;
	@Column(nullable = false, columnDefinition = " MEDIUMTEXT ")
	private String content;
	@Column(length = 2, nullable = false)
	private Integer status;
	@Column(name = "create_time", columnDefinition = " datetime", nullable = false)
	private Date createTime;
}
